3.6.40 \(\int \cos (c+d x) (a+b \tan (c+d x))^3 \, dx\) [540]

Optimal. Leaf size=84 \[ \frac {3 a b^2 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {\cos (c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))^2}{d}-\frac {b \sec (c+d x) \left (2 \left (a^2-b^2\right )+a b \tan (c+d x)\right )}{d} \]

[Out]

3*a*b^2*arctanh(sin(d*x+c))/d-cos(d*x+c)*(b-a*tan(d*x+c))*(a+b*tan(d*x+c))^2/d-b*sec(d*x+c)*(2*a^2-2*b^2+a*b*t
an(d*x+c))/d

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 102, normalized size of antiderivative = 1.21, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3593, 753, 794, 221} \begin {gather*} -\frac {b \sec (c+d x) \left (2 \left (a^2-b^2\right )+a b \tan (c+d x)\right )}{d}+\frac {3 a b^2 \cos (c+d x) \sqrt {\sec ^2(c+d x)} \sinh ^{-1}(\tan (c+d x))}{d}-\frac {\cos (c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))^2}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]*(a + b*Tan[c + d*x])^3,x]

[Out]

(3*a*b^2*ArcSinh[Tan[c + d*x]]*Cos[c + d*x]*Sqrt[Sec[c + d*x]^2])/d - (Cos[c + d*x]*(b - a*Tan[c + d*x])*(a +
b*Tan[c + d*x])^2)/d - (b*Sec[c + d*x]*(2*(a^2 - b^2) + a*b*Tan[c + d*x]))/d

Rule 221

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt[a])]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 753

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^(m - 1)*(a*e - c*d*x)*((a
 + c*x^2)^(p + 1)/(2*a*c*(p + 1))), x] + Dist[1/((p + 1)*(-2*a*c)), Int[(d + e*x)^(m - 2)*Simp[a*e^2*(m - 1) -
 c*d^2*(2*p + 3) - d*c*e*(m + 2*p + 2)*x, x]*(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^
2 + a*e^2, 0] && LtQ[p, -1] && GtQ[m, 1] && IntQuadraticQ[a, 0, c, d, e, m, p, x]

Rule 794

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((e*f + d*g)*(2*p
+ 3) + 2*e*g*(p + 1)*x)*((a + c*x^2)^(p + 1)/(2*c*(p + 1)*(2*p + 3))), x] - Dist[(a*e*g - c*d*f*(2*p + 3))/(c*
(2*p + 3)), Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, p}, x] &&  !LeQ[p, -1]

Rule 3593

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[d^(2*
IntPart[m/2])*((d*Sec[e + f*x])^(2*FracPart[m/2])/(b*f*(Sec[e + f*x]^2)^FracPart[m/2])), Subst[Int[(a + x)^n*(
1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && NeQ[a^2 + b^2, 0] &&
 !IntegerQ[m/2]

Rubi steps

\begin {align*} \int \cos (c+d x) (a+b \tan (c+d x))^3 \, dx &=\frac {\left (\cos (c+d x) \sqrt {\sec ^2(c+d x)}\right ) \text {Subst}\left (\int \frac {(a+x)^3}{\left (1+\frac {x^2}{b^2}\right )^{3/2}} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=-\frac {\cos (c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))^2}{d}+\frac {\left (b \cos (c+d x) \sqrt {\sec ^2(c+d x)}\right ) \text {Subst}\left (\int \frac {(a+x) \left (2-\frac {2 a x}{b^2}\right )}{\sqrt {1+\frac {x^2}{b^2}}} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac {\cos (c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))^2}{d}-\frac {b \sec (c+d x) \left (2 \left (a^2-b^2\right )+a b \tan (c+d x)\right )}{d}+\frac {\left (3 a b \cos (c+d x) \sqrt {\sec ^2(c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{b^2}}} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac {3 a b^2 \sinh ^{-1}(\tan (c+d x)) \cos (c+d x) \sqrt {\sec ^2(c+d x)}}{d}-\frac {\cos (c+d x) (b-a \tan (c+d x)) (a+b \tan (c+d x))^2}{d}-\frac {b \sec (c+d x) \left (2 \left (a^2-b^2\right )+a b \tan (c+d x)\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.14, size = 131, normalized size = 1.56 \begin {gather*} \frac {\sec (c+d x) \left (-3 a^2 b+3 b^3+\left (-3 a^2 b+b^3\right ) \cos (2 (c+d x))-6 a b^2 \cos (c+d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+a^3 \sin (2 (c+d x))-3 a b^2 \sin (2 (c+d x))\right )}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]*(a + b*Tan[c + d*x])^3,x]

[Out]

(Sec[c + d*x]*(-3*a^2*b + 3*b^3 + (-3*a^2*b + b^3)*Cos[2*(c + d*x)] - 6*a*b^2*Cos[c + d*x]*(Log[Cos[(c + d*x)/
2] - Sin[(c + d*x)/2]] - Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]) + a^3*Sin[2*(c + d*x)] - 3*a*b^2*Sin[2*(c +
 d*x)]))/(2*d)

________________________________________________________________________________________

Maple [A]
time = 0.18, size = 96, normalized size = 1.14

method result size
derivativedivides \(\frac {a^{3} \sin \left (d x +c \right )-3 a^{2} b \cos \left (d x +c \right )+3 b^{2} a \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )}{d}\) \(96\)
default \(\frac {a^{3} \sin \left (d x +c \right )-3 a^{2} b \cos \left (d x +c \right )+3 b^{2} a \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )}{d}\) \(96\)
risch \(-\frac {3 \,{\mathrm e}^{i \left (d x +c \right )} b \,a^{2}}{2 d}+\frac {{\mathrm e}^{i \left (d x +c \right )} b^{3}}{2 d}-\frac {i a^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {3 i {\mathrm e}^{i \left (d x +c \right )} b^{2} a}{2 d}-\frac {3 \,{\mathrm e}^{-i \left (d x +c \right )} b \,a^{2}}{2 d}+\frac {{\mathrm e}^{-i \left (d x +c \right )} b^{3}}{2 d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} a^{3}}{2 d}-\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} b^{2} a}{2 d}+\frac {2 b^{3} {\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{d}\) \(220\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*(a+b*tan(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^3*sin(d*x+c)-3*a^2*b*cos(d*x+c)+3*b^2*a*(-sin(d*x+c)+ln(sec(d*x+c)+tan(d*x+c)))+b^3*(sin(d*x+c)^4/cos(d
*x+c)+(2+sin(d*x+c)^2)*cos(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 84, normalized size = 1.00 \begin {gather*} \frac {2 \, b^{3} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )} + 3 \, a b^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right ) - 2 \, \sin \left (d x + c\right )\right )} - 6 \, a^{2} b \cos \left (d x + c\right ) + 2 \, a^{3} \sin \left (d x + c\right )}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

1/2*(2*b^3*(1/cos(d*x + c) + cos(d*x + c)) + 3*a*b^2*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1) - 2*sin(d*
x + c)) - 6*a^2*b*cos(d*x + c) + 2*a^3*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 109, normalized size = 1.30 \begin {gather*} \frac {3 \, a b^{2} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, a b^{2} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, b^{3} - 2 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

1/2*(3*a*b^2*cos(d*x + c)*log(sin(d*x + c) + 1) - 3*a*b^2*cos(d*x + c)*log(-sin(d*x + c) + 1) + 2*b^3 - 2*(3*a
^2*b - b^3)*cos(d*x + c)^2 + 2*(a^3 - 3*a*b^2)*cos(d*x + c)*sin(d*x + c))/(d*cos(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan {\left (c + d x \right )}\right )^{3} \cos {\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c))**3,x)

[Out]

Integral((a + b*tan(c + d*x))**3*cos(c + d*x), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 4741 vs. \(2 (83) = 166\).
time = 2.84, size = 4741, normalized size = 56.44 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*tan(d*x+c))^3,x, algorithm="giac")

[Out]

-1/4*(3*pi*a^2*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - tan(1/2*d*x)^2 - 4*tan(1/2*d*x)*tan(1/2*c) - tan(1/2*c)^2 +
 1)*tan(1/2*d*x)^4*tan(1/2*c)^4 - 3*pi*a^2*b*tan(1/2*d*x)^4*tan(1/2*c)^4 - 6*a^2*b*arctan((tan(1/2*d*x)*tan(1/
2*c) + tan(1/2*d*x) + tan(1/2*c) - 1)/(tan(1/2*d*x)*tan(1/2*c) - tan(1/2*d*x) - tan(1/2*c) - 1))*tan(1/2*d*x)^
4*tan(1/2*c)^4 - 6*a^2*b*arctan((tan(1/2*d*x)*tan(1/2*c) - tan(1/2*d*x) - tan(1/2*c) - 1)/(tan(1/2*d*x)*tan(1/
2*c) + tan(1/2*d*x) + tan(1/2*c) - 1))*tan(1/2*d*x)^4*tan(1/2*c)^4 + 6*a*b^2*log(2*(tan(1/2*d*x)^4*tan(1/2*c)^
2 + 2*tan(1/2*d*x)^4*tan(1/2*c) + 2*tan(1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)
^2 - 2*tan(1/2*d*x)^3 + 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan
(1/2*c) + 1)/(tan(1/2*c)^2 + 1))*tan(1/2*d*x)^4*tan(1/2*c)^4 - 6*a*b^2*log(2*(tan(1/2*d*x)^4*tan(1/2*c)^2 - 2*
tan(1/2*d*x)^4*tan(1/2*c) - 2*tan(1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2
*tan(1/2*d*x)^3 - 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c
) + 1)/(tan(1/2*c)^2 + 1))*tan(1/2*d*x)^4*tan(1/2*c)^4 - 12*pi*a^2*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - tan(1/2
*d*x)^2 - 4*tan(1/2*d*x)*tan(1/2*c) - tan(1/2*c)^2 + 1)*tan(1/2*d*x)^3*tan(1/2*c)^3 + 12*a^2*b*tan(1/2*d*x)^4*
tan(1/2*c)^4 - 8*b^3*tan(1/2*d*x)^4*tan(1/2*c)^4 + 12*pi*a^2*b*tan(1/2*d*x)^3*tan(1/2*c)^3 + 24*a^2*b*arctan((
tan(1/2*d*x)*tan(1/2*c) + tan(1/2*d*x) + tan(1/2*c) - 1)/(tan(1/2*d*x)*tan(1/2*c) - tan(1/2*d*x) - tan(1/2*c)
- 1))*tan(1/2*d*x)^3*tan(1/2*c)^3 + 24*a^2*b*arctan((tan(1/2*d*x)*tan(1/2*c) - tan(1/2*d*x) - tan(1/2*c) - 1)/
(tan(1/2*d*x)*tan(1/2*c) + tan(1/2*d*x) + tan(1/2*c) - 1))*tan(1/2*d*x)^3*tan(1/2*c)^3 - 24*a*b^2*log(2*(tan(1
/2*d*x)^4*tan(1/2*c)^2 + 2*tan(1/2*d*x)^4*tan(1/2*c) + 2*tan(1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(
1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^3 + 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2
*tan(1/2*d*x) - 2*tan(1/2*c) + 1)/(tan(1/2*c)^2 + 1))*tan(1/2*d*x)^3*tan(1/2*c)^3 + 24*a*b^2*log(2*(tan(1/2*d*
x)^4*tan(1/2*c)^2 - 2*tan(1/2*d*x)^4*tan(1/2*c) - 2*tan(1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d
*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^3 - 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(
1/2*d*x) + 2*tan(1/2*c) + 1)/(tan(1/2*c)^2 + 1))*tan(1/2*d*x)^3*tan(1/2*c)^3 + 8*a^3*tan(1/2*d*x)^4*tan(1/2*c)
^3 - 24*a*b^2*tan(1/2*d*x)^4*tan(1/2*c)^3 + 8*a^3*tan(1/2*d*x)^3*tan(1/2*c)^4 - 24*a*b^2*tan(1/2*d*x)^3*tan(1/
2*c)^4 - 3*pi*a^2*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - tan(1/2*d*x)^2 - 4*tan(1/2*d*x)*tan(1/2*c) - tan(1/2*c)^
2 + 1)*tan(1/2*d*x)^4 - 12*pi*a^2*b*sgn(tan(1/2*d*x)^2*tan(1/2*c)^2 - tan(1/2*d*x)^2 - 4*tan(1/2*d*x)*tan(1/2*
c) - tan(1/2*c)^2 + 1)*tan(1/2*d*x)^3*tan(1/2*c) - 24*a^2*b*tan(1/2*d*x)^4*tan(1/2*c)^2 - 12*pi*a^2*b*sgn(tan(
1/2*d*x)^2*tan(1/2*c)^2 - tan(1/2*d*x)^2 - 4*tan(1/2*d*x)*tan(1/2*c) - tan(1/2*c)^2 + 1)*tan(1/2*d*x)*tan(1/2*
c)^3 - 96*a^2*b*tan(1/2*d*x)^3*tan(1/2*c)^3 + 32*b^3*tan(1/2*d*x)^3*tan(1/2*c)^3 - 3*pi*a^2*b*sgn(tan(1/2*d*x)
^2*tan(1/2*c)^2 - tan(1/2*d*x)^2 - 4*tan(1/2*d*x)*tan(1/2*c) - tan(1/2*c)^2 + 1)*tan(1/2*c)^4 - 24*a^2*b*tan(1
/2*d*x)^2*tan(1/2*c)^4 + 3*pi*a^2*b*tan(1/2*d*x)^4 + 6*a^2*b*arctan((tan(1/2*d*x)*tan(1/2*c) + tan(1/2*d*x) +
tan(1/2*c) - 1)/(tan(1/2*d*x)*tan(1/2*c) - tan(1/2*d*x) - tan(1/2*c) - 1))*tan(1/2*d*x)^4 + 6*a^2*b*arctan((ta
n(1/2*d*x)*tan(1/2*c) - tan(1/2*d*x) - tan(1/2*c) - 1)/(tan(1/2*d*x)*tan(1/2*c) + tan(1/2*d*x) + tan(1/2*c) -
1))*tan(1/2*d*x)^4 - 6*a*b^2*log(2*(tan(1/2*d*x)^4*tan(1/2*c)^2 + 2*tan(1/2*d*x)^4*tan(1/2*c) + 2*tan(1/2*d*x)
^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^3 + 2*tan(1/2*d*x)*tan(1/2*c
)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1)/(tan(1/2*c)^2 + 1))*tan(1/2*d*x)^4
+ 6*a*b^2*log(2*(tan(1/2*d*x)^4*tan(1/2*c)^2 - 2*tan(1/2*d*x)^4*tan(1/2*c) - 2*tan(1/2*d*x)^3*tan(1/2*c)^2 + t
an(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^3 - 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/2*d*x
)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1)/(tan(1/2*c)^2 + 1))*tan(1/2*d*x)^4 + 12*pi*a^2*b*tan(1
/2*d*x)^3*tan(1/2*c) + 24*a^2*b*arctan((tan(1/2*d*x)*tan(1/2*c) + tan(1/2*d*x) + tan(1/2*c) - 1)/(tan(1/2*d*x)
*tan(1/2*c) - tan(1/2*d*x) - tan(1/2*c) - 1))*tan(1/2*d*x)^3*tan(1/2*c) + 24*a^2*b*arctan((tan(1/2*d*x)*tan(1/
2*c) - tan(1/2*d*x) - tan(1/2*c) - 1)/(tan(1/2*d*x)*tan(1/2*c) + tan(1/2*d*x) + tan(1/2*c) - 1))*tan(1/2*d*x)^
3*tan(1/2*c) - 24*a*b^2*log(2*(tan(1/2*d*x)^4*tan(1/2*c)^2 + 2*tan(1/2*d*x)^4*tan(1/2*c) + 2*tan(1/2*d*x)^3*ta
n(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^3 + 2*tan(1/2*d*x)*tan(1/2*c)^2 +
 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1)/(tan(1/2*c)^2 + 1))*tan(1/2*d*x)^3*tan(1
/2*c) + 24*a*b^2*log(2*(tan(1/2*d*x)^4*tan(1/2*c)^2 - 2*tan(1/2*d*x)^4*tan(1/2*c) - 2*tan(1/2*d*x)^3*tan(1/2*c
)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2...

________________________________________________________________________________________

Mupad [B]
time = 4.25, size = 116, normalized size = 1.38 \begin {gather*} \frac {6\,a\,b^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (6\,a\,b^2-2\,a^3\right )-6\,a^2\,b-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (6\,a\,b^2-2\,a^3\right )+4\,b^3+6\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)*(a + b*tan(c + d*x))^3,x)

[Out]

(6*a*b^2*atanh(tan(c/2 + (d*x)/2)))/d - (tan(c/2 + (d*x)/2)^3*(6*a*b^2 - 2*a^3) - 6*a^2*b - tan(c/2 + (d*x)/2)
*(6*a*b^2 - 2*a^3) + 4*b^3 + 6*a^2*b*tan(c/2 + (d*x)/2)^2)/(d*(tan(c/2 + (d*x)/2)^4 - 1))

________________________________________________________________________________________